package Tetravex;

import java.awt.Image;
import javax.swing.ImageIcon;

/**

 * @author Alex Muñoz Dominguez, Mauricio Orellana Galaz
 * 
 */
public enum Icons 
{
    LOGO("Icons/gnotravex-logo.png"),
    ONE("Icons/one.png"),
    TWO("Icons/two.png"),
    THREE("Icons/three.png"),
    FOUR("Icons/four.png"),
    FIVE("Icons/five.png"),
    SIX("Icons/six.png"),
    SEVEN("Icons/seven.png"),
    EIGHT("Icons/eight.png"),
    NINE("Icons/nine.png"),
    ZERO("Icons/zero.png");
    
    private Image img;

    private Icons(String img)
    {
        this.img =  new ImageIcon( getClass().getResource(img)).getImage();
    }

    public Image getImg() {
        return img;
    }
    
    public static Image getIconNumber(int value)
    {
        if(value == 0)
        {
            return Icons.ZERO.getImg();
        }
        if(value == 1)
        {
            return Icons.ONE.getImg();
        }
        if(value == 2)
        {
            return Icons.TWO.getImg();
        }
        if(value == 3)
        {
            return Icons.THREE.getImg();
        }
        if(value == 4)
        {
            return Icons.FOUR.getImg();
        }
        if(value == 5)
        {
            return Icons.FIVE.getImg();
        }
        if(value == 6)
        {
            return Icons.SIX.getImg();
        }
        if(value == 7)
        {
            return Icons.SEVEN.getImg();
        }
        if(value == 8)
        {
            return Icons.EIGHT.getImg();
        }
        if(value == 9)
        {
            return Icons.NINE.getImg();
        }
        
        return null;
    }
}